import Vue from 'vue'
import Router from 'vue-router';
Vue.use(Router)

export default new Router({

  routes: [
    {
      path: '/login',
      name: 'login',
      component: () => import('@/pages/login')
    },
    {
      path: '/',
      name: 'Homepage',
      component: () => import('@/pages/Homepage/Index'),
      meta: { requireAuth: true }
    },
    {
      path: '/HomeIndex',
      name: 'HomeIndex',
      component: () => import('@/pages/index'),
      meta: { requireAuth: true },
      children: [{
        path: '/VehicleArchives',
        component: () => import('@/pages/Homepage/Vehiclefiles/VehicleArchives'),
        meta: { requireAuth: true },
      }, {
        path: '/VehicleArchivesDetails',
        component: () => import('@/pages/Homepage/Vehiclefiles/VehicleArchivesDetails'),
        meta: { requireAuth: true },
      }, {
        path: '/Driverfiles',
        component: () => import('@/pages/Homepage/Driverfiles/index'),
        meta: { requireAuth: true },
      }, {
        path: '/Driverfiledetails',
        component: () => import('@/pages/Homepage/Driverfiles/Driverfiledetails'),
        meta: { requireAuth: true },
      }, {
        path: '/Personnelirregularitiesregistration',
        component: () => import('@/pages/Homepage/Personnelirregularitiesregistration/index'),
        meta: { requireAuth: true },
      }, {
        path: '/Equipment',
        component: () => import('@/pages/Homepage/Equipment/index'),
        meta: { requireAuth: true },
      }, {
        path: '/Nopowerfile',
        component: () => import('@/pages/Homepage/Nopowerfile/index'),
        meta: { requireAuth: true },
      }, {
        path: '/NopowerfileTable',
        component: () => import('@/pages/Homepage/Nopowerfile/Nopowerdetails'),
        meta: { requireAuth: true },
      }, {
        path: '/InformationAircraft',
        component: () => import('@/pages/Homepage/InformationAircraft/index'),
        meta: { requireAuth: true },
      }, {
        path: '/InformationAircraftdetails',
        component: () => import('@/pages/Homepage/InformationAircraft/InformationAircraftdetails'),
        meta: { requireAuth: true },
      }, {
        path: '/AviationSubmissionForm',
        component: () => import('@/pages/Homepage/InformationAircraft/AviationSubmissionForm'),
        meta: { requireAuth: true },
      }, {
        path: '/StatisticalAnalysis',
        component: () => import('@/pages/Homepage/StatisticalAnalysis/index.vue'),
        meta: { requireAuth: true },
      }, {
        path: '/bar',
        component: () => import('@/pages/Homepage/StatisticalAnalysis/bar.vue'),
        meta: { requireAuth: true },
      }, {
        path: '/Driverstatistics',
        component: () => import('@/pages/Homepage/StatisticalAnalysis/Driverstatistics.vue'),
        meta: { requireAuth: true },
      }, {
        path: '/Driverstatisticsdetails',
        component: () => import('@/pages/Homepage/StatisticalAnalysis/Driverstatisticsdetails.vue'),
        meta: { requireAuth: true },
      }, {
        path: '/dertetail',
        component: () => import('@/pages/Homepage/StatisticalAnalysis/dertetail.vue'),
        meta: { requireAuth: true },
      }, {
        path: '/carstatistics',
        component: () => import('@/pages/Homepage/StatisticalAnalysis/carstatistics.vue'),
        meta: { requireAuth: true },
      }, {
        path: '/carstatisticsdetail',
        component: () => import('@/pages/Homepage/StatisticalAnalysis/carstatisticsdetail.vue'),
        meta: { requireAuth: true },
      }, {
        path: '/carDetails',
        component: () => import('@/pages/Homepage/StatisticalAnalysis/carDetails.vue'),
        meta: { requireAuth: true },
      }]
    },
    {
      path: '/Scan',
      name: 'Scan',
      component: () => import('@/pages/Scan/Scan'),
      meta: { requireAuth: true }
    },
    {
      path: '/Find',
      name: 'Find',
      component: () => import('@/pages/Find/Find'),
      meta: { requireAuth: true },
    },
    {
      path: '/MyApproval',
      name: 'MyApproval',
      component: () => import('@/pages/Find/MyApproval'),
      meta: { requireAuth: true }
    },
    {
      path: '/NewsIndex',
      name: 'News',
      component: () => import('@/pages/News/NewsIndex'),
      meta: { requireAuth: true },
      children: [{
        path: '/News',
        component: () => import('@/pages/News/News'),
        meta: { requireAuth: true },
      },{
        path: '/Detils',
        component: () => import('@/pages/News/Detils'),
        meta: { requireAuth: true },
      }]
    },
    {
      path: '/MY',
      name: 'MY',
      component: () => import('@/pages/My/MyIndex'),
      meta: { requireAuth: true },
      children: [{
        path: '/Personainformation',
        component: () => import('@/pages/My/Personainformation'),
        meta: { requireAuth: true },
      }]
    },
  ]
})
